#include "stdafx.h"
#include "service\storage\file\MatchFileService.h"
#include "model\Match.h"

MatchFileService::MatchFileService(){

}
MatchFileService::MatchFileService(const std::string fname) : BaseFileService(fname) {

}

MatchFileService::MatchFileService(std::fstream& file) : BaseFileService (file) {

}

MatchFileService::~MatchFileService() {

}


BaseFileService& MatchFileService::Save(const BaseModel& model) {
  file() << reinterpret_cast<const Match&>(model) << '\n';
  return *this;
}


BaseFileService& MatchFileService::Load(BaseModel* model) {
  file() >> *reinterpret_cast<Match*>(model);
  return *this;
}
